﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace MMITDomain.Entities
{
    public class Account
    {
        
        public int Id
        {
            get;
            set;
        }

        public int CurrencyId
        {
            get;
            set;
        }
        public int AccountTypeId
        {
            get;
            set;
        }

        public int CustomerId
        {
            get;
            set;
        }
        public string Name
        {
            get;
            set;
        }

        public int Status
        {
            get;
            set;
        }

        public decimal? ActualBalance
        {
            get;
            set;
        }
        public decimal? AvailableBalance
        {
            get;
            set;
        }

        public virtual AccountType AccountType
        {
            get;
            set;
        }

        public virtual ICollection<Rule> Rules
        {
            get;
            set;
        }

        public virtual Customer Customer
        {
            get;
            set;
        }

        public virtual Currency Currency
        {
            get;
            set;
        }

        public string coreStatus
        {
            get
            {
                return Enum.GetName(typeof(AccountStatuses), this.Status);
            }
        }

    }
    
    public enum AccountStatuses
    {

        Active = 6,
        Inactive = 7,
        Suspended = 8,
    }

}
